package com.dragon.modules.yuegou.service.product;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dragon.common.web.PageRequest;
import com.dragon.modules.yuegou.entity.product.LimitSalesEntity;
import com.dragon.modules.yuegou.model.order.Order;
import com.dragon.modules.yuegou.model.product.LimitSales;
import com.dragon.modules.yuegou.model.product.Spu;
import com.dragon.modules.yuegou.query.product.LimitSalesQuery;

import java.math.BigDecimal;

/**
 * 限时折扣信息表 服务接口
 *
 * @author pbuilder generated
 * @date 2019-09-24 10:22:32
 * @version 2.0
 */
public interface LimitSalesService extends IService<LimitSalesEntity> {

	IPage<LimitSales> limitSalesList(PageRequest page, LimitSalesQuery query);

	IPage<LimitSales> productlist(PageRequest page, LimitSalesQuery query);

	LimitSales productDetail(String limitSalesId);

	Order order(String limitSalesId, String skuId);

	/**
	 * 新增限时折扣商品
	 * @return
	 */
	void saveLimitSales(LimitSales limitSales, Spu spu);

	/**
	 * 支付回调
	 * @param orderNo
	 */
	void orderCallBack(String orderNo);

	LimitSales limitsaleDetail(String id);

	/**
	 * 根据skuId 查询最低折扣金额
	 * @param skuId
	 * @return
	 */
	BigDecimal limitsaleDiscountBySpu(String skuId);

}